<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html  xmlns="http://www.w3.org/1999/xhtml"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:p="http://primefaces.org/ui"
       xmlns:cc="http://java.sun.com/jsf/composite"
       xmlns:pe="http://primefaces.org/ui/extensions"
       xmlns:comp="http://java.sun.com/jsf/composite/componentes"> 
	      
	     <!--INFERFACE-->
	     <cc:interface>  
	         <cc:attribute name="tituloText" />  
	         <cc:attribute name="tituloImage" /> 
	         <cc:attribute name="classBean" /> 
	         <cc:attribute name="actionNovo" method-signature="void action()"/>  
	         <cc:attribute name="updateShowFilter" />  
	         <cc:attribute name="buttonFilterVisible" />  
	         <cc:attribute name="dataTableExporter" />  
	     </cc:interface>  
	     
	     <!--IMPLEMENTATION--> 
	     <cc:implementation>  
	        
		        <!--TITULO FILTER -->
				<table>
					<tr>
						<td width="100%">
						
						   <!-- TITULO LIST -->
						   <table  width="70%" cellspacing="5">
							   <tr>
							      <td width="1px">
							         <h:graphicImage library="images" 
							                         value="#{cc.attrs.tituloImage}" 
							                         styleClass="icone-titulo" />
							      </td>
							      <td>
							          <h:outputText  styleClass="label-titulo-2"  
							                         value="#{cc.attrs.tituloText}" />
							      </td>
							   </tr>
						   </table>	
						      	   
						</td>
						
						<!-- NOVO -->
						<td align="right">
						
						    <p:commandButton rendered="#{usuarioBean.permissaoIncluir()}"
											 value="#{msg['btn-value-novo']}" 
											 styleClass="ui-priority-primary"
											 action="#{cc.attrs.actionNovo}" 
											 immediate="true" />
						</td>
			
						<!-- EXIBIR/OCULTAR FILTRO -->
						<td align="right">
						
						    <p:commandButton id="btnFiltro"  
						                    rendered="#{cc.attrs.buttonFilterVisible}" 
						                    action="#{cc.attrs.classBean.showFilter()}"
			                                title="#{msg['btn-title-exibirfiltro']}" 
			                                icon="#{cc.attrs.classBean.isFilterVisible ? 'ui-icon-carat-1-n' : 'ui-icon-carat-1-s'}"
			                                process="@this"
			                                update="@this,#{cc.attrs.updateShowFilter}" >  
			                                <pe:tooltip for="btnFiltro"
			                                            value="#{cc.attrs.classBean.isFilterVisible ? msg['btn-title-ocultarfiltro'] : 
			                                                                                          msg['btn-title-exibirfiltro']}" 
					                                    showEffect="fadeIn" hideEffect="fadeIn"/>     
			                </p:commandButton>
					   </td>
					</tr>
				</table>
			
		</cc:implementation>  
     
 </html>     
